package com.csi.okr.mobile.common.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 与OKR_评分明细_O（目标）表(T_OKR_SCORE_DETAIL_OBJECTIVES)对应的实体类
 * 
 */
@Entity
@Table(name = "T_OKR_SCORE_DETAIL_OBJECTIVES", schema = "PSGIS")
public class TOkrScoreDetailObjectives implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	
	private String scoreDetailOUuid;
	private String OScoreUuid;
	/**
	 * O唯一标识码
	 */
	private String OUniqueIdCode;
	/**
	 * O的定义
	 */
	private String ODefinition;
	/**
	 * O的评分[自评]
	 */
	private Integer OScoreOneself;
	/**
	 * O的评分[上级评]
	 */
	private Integer OScoreSuperior;
	/**
	 * O的评分说明[上级评]
	 */
	private String OScoreExplainOneself;
	/**
	 * O的评分说明[上级评]
	 */
	private String OScoreExplainSuperior;

	public TOkrScoreDetailObjectives() {
	}

	public TOkrScoreDetailObjectives(String scoreDetailOUuid) {
		this.scoreDetailOUuid = scoreDetailOUuid;
	}

	public TOkrScoreDetailObjectives(String scoreDetailOUuid, String OScoreUuid, String OUniqueIdCode,
			String ODefinition, Integer OScoreOneself, Integer OScoreSuperior, String OScoreExplainOneself,
			String OScoreExplainSuperior) {
		this.scoreDetailOUuid = scoreDetailOUuid;
		this.OScoreUuid = OScoreUuid;
		this.OUniqueIdCode = OUniqueIdCode;
		this.ODefinition = ODefinition;
		this.OScoreOneself = OScoreOneself;
		this.OScoreSuperior = OScoreSuperior;
		this.OScoreExplainOneself = OScoreExplainOneself;
		this.OScoreExplainSuperior = OScoreExplainSuperior;
	}

	@Id
	@Column(name = "SCORE_DETAIL_O_UUID", unique = true, nullable = false, length = 32)
	public String getScoreDetailOUuid() {
		return this.scoreDetailOUuid;
	}

	public void setScoreDetailOUuid(String scoreDetailOUuid) {
		this.scoreDetailOUuid = scoreDetailOUuid;
	}

	@Column(name = "O_SCORE_UUID", length = 32)
	public String getOScoreUuid() {
		return this.OScoreUuid;
	}

	public void setOScoreUuid(String OScoreUuid) {
		this.OScoreUuid = OScoreUuid;
	}

	@Column(name = "O_UNIQUE_ID_CODE", length = 20)
	public String getOUniqueIdCode() {
		return this.OUniqueIdCode;
	}

	public void setOUniqueIdCode(String OUniqueIdCode) {
		this.OUniqueIdCode = OUniqueIdCode;
	}

	@Column(name = "O_DEFINITION", length = 256)
	public String getODefinition() {
		return this.ODefinition;
	}

	public void setODefinition(String ODefinition) {
		this.ODefinition = ODefinition;
	}

	@Column(name = "O_SCORE_ONESELF", precision = 8, scale = 0)
	public Integer getOScoreOneself() {
		return this.OScoreOneself;
	}

	public void setOScoreOneself(Integer OScoreOneself) {
		this.OScoreOneself = OScoreOneself;
	}

	@Column(name = "O_SCORE_SUPERIOR", precision = 8, scale = 0)
	public Integer getOScoreSuperior() {
		return this.OScoreSuperior;
	}

	public void setOScoreSuperior(Integer OScoreSuperior) {
		this.OScoreSuperior = OScoreSuperior;
	}

	@Column(name = "O_SCORE_EXPLAIN_ONESELF", length = 1024)
	public String getOScoreExplainOneself() {
		return this.OScoreExplainOneself;
	}

	public void setOScoreExplainOneself(String OScoreExplainOneself) {
		this.OScoreExplainOneself = OScoreExplainOneself;
	}

	@Column(name = "O_SCORE_EXPLAIN_SUPERIOR", length = 1024)
	public String getOScoreExplainSuperior() {
		return this.OScoreExplainSuperior;
	}

	public void setOScoreExplainSuperior(String OScoreExplainSuperior) {
		this.OScoreExplainSuperior = OScoreExplainSuperior;
	}
	
	/**
	 * 评分与O目标表关联
	 */
	private TOkrObjectives tOkrObj;
	
	@OneToOne
	@JoinColumn(name="O_UNIQUE_ID_CODE",insertable=false,updatable=false)
	@JsonIgnore
	public TOkrObjectives gettOkrObj() {
		return tOkrObj;
	}

	public void settOkrObj(TOkrObjectives tOkrObj) {
		this.tOkrObj = tOkrObj;
	}
	

}
